<!--
 * @Descripttion: Sustainable
 * @version: 1.0.0
 * @Author: Kenny
 * @Date: 2021-11-01 15:03:03
 * @LastEditors: ~
 * @LastEditTime: 2021-12-02 12:35:28
-->
<!DOCTYPE html>
<html lang="en">

<head>
   <meta charset="UTF-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>Document</title>
   <style>
      .two-col .column:nth-of-type(1) {
         float: left;
         width: 200px;
         height: 300px;
         margin-right: 10px;
         background-color: red;
      }

      .two-col .column:nth-of-type(2) {
         overflow: hidden;
         /*创建bfc */
         height: 300px;
         background-color: purple;
      }

      .contain .column:nth-of-type(1),
      .contain .column:nth-of-type(2) {
         width: 100px;
         height: 300px;
         background-color: green;
      }

      .contain .column:nth-of-type(1) {
         float: left;
      }

      .contain .column:nth-of-type(2) {
         float: right;
      }

      .contain .column:nth-of-type(3) {
         overflow: hidden;
         /*创建bfc*/
         height: 300px;
         background-color: red;
      }
   </style>
</head>

<body>
   <p>两栏布局: 左边固定宽度，右边不设宽，因此右边的宽度自适应，随浏览器窗口大小的变化而变化</p>
   <div class="two-col">
      <div class="column"></div>
      <div class="column"></div>
   </div>
   <p>三栏布局: 左右两边固定宽度，中间不设宽，因此中间的宽度自适应，随浏览器的大小变化而变化</p>
   <div>
      <div class="contain">
         <div class="column"></div>
         <div class="column"></div>
         <div class="column"></div>
      </div>
   </div>

</body>

</html>